static const unsigned char gsUrlEncodeMap[256] = {
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0',  '+', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0',  '-',  '.', '\0',  '0',  '1',
 '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9', '\0', '\0',
'\0', '\0', '\0', '\0', '\0',  'A',  'B',  'C',  'D',  'E',
 'F',  'G',  'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
 'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',  'X',  'Y',
 'Z', '\0', '\0', '\0', '\0',  '_', '\0',  'a',  'b',  'c',
 'd',  'e',  'f',  'g',  'h',  'i',  'j',  'k',  'l',  'm',
 'n',  'o',  'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
 'x',  'y',  'z', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0'
};

static const unsigned char gsUrlEncodeMinMap[256] = {
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0',  '+',  '!', '\0', '\0',  '$', '\0', '\0', '\0',
 '(',  ')',  '*', '\0',  ',',  '-',  '.',  '/',  '0',  '1',
 '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',  ':',  ';',
'\0', '\0', '\0',  '?',  '@',  'A',  'B',  'C',  'D',  'E',
 'F',  'G',  'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
 'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',  'X',  'Y',
 'Z', '\0', '\0', '\0', '\0',  '_', '\0',  'a',  'b',  'c',
 'd',  'e',  'f',  'g',  'h',  'i',  'j',  'k',  'l',  'm',
 'n',  'o',  'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
 'x',  'y',  'z', '\0', '\0', '\0',  '~', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\0', '\0', '\0', '\0'
};

static const uint32_t gsHexDecodeMap[256] = {
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
  0,   1,   2,   3,   4,   5,   6,   7,   8,   9, 256, 256,
256, 256, 256, 256, 256,  10,  11,  12,  13,  14,  15, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256,  10,  11,  12,  13,  14,  15, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256
};

static const unsigned char gsHexEncodeMap1[256] = {
 '0',  '0',  '0',  '0',  '0',  '0',  '0',  '0',  '0',  '0',
 '0',  '0',  '0',  '0',  '0',  '0',  '1',  '1',  '1',  '1',
 '1',  '1',  '1',  '1',  '1',  '1',  '1',  '1',  '1',  '1',
 '1',  '1',  '2',  '2',  '2',  '2',  '2',  '2',  '2',  '2',
 '2',  '2',  '2',  '2',  '2',  '2',  '2',  '2',  '3',  '3',
 '3',  '3',  '3',  '3',  '3',  '3',  '3',  '3',  '3',  '3',
 '3',  '3',  '3',  '3',  '4',  '4',  '4',  '4',  '4',  '4',
 '4',  '4',  '4',  '4',  '4',  '4',  '4',  '4',  '4',  '4',
 '5',  '5',  '5',  '5',  '5',  '5',  '5',  '5',  '5',  '5',
 '5',  '5',  '5',  '5',  '5',  '5',  '6',  '6',  '6',  '6',
 '6',  '6',  '6',  '6',  '6',  '6',  '6',  '6',  '6',  '6',
 '6',  '6',  '7',  '7',  '7',  '7',  '7',  '7',  '7',  '7',
 '7',  '7',  '7',  '7',  '7',  '7',  '7',  '7',  '8',  '8',
 '8',  '8',  '8',  '8',  '8',  '8',  '8',  '8',  '8',  '8',
 '8',  '8',  '8',  '8',  '9',  '9',  '9',  '9',  '9',  '9',
 '9',  '9',  '9',  '9',  '9',  '9',  '9',  '9',  '9',  '9',
 'A',  'A',  'A',  'A',  'A',  'A',  'A',  'A',  'A',  'A',
 'A',  'A',  'A',  'A',  'A',  'A',  'B',  'B',  'B',  'B',
 'B',  'B',  'B',  'B',  'B',  'B',  'B',  'B',  'B',  'B',
 'B',  'B',  'C',  'C',  'C',  'C',  'C',  'C',  'C',  'C',
 'C',  'C',  'C',  'C',  'C',  'C',  'C',  'C',  'D',  'D',
 'D',  'D',  'D',  'D',  'D',  'D',  'D',  'D',  'D',  'D',
 'D',  'D',  'D',  'D',  'E',  'E',  'E',  'E',  'E',  'E',
 'E',  'E',  'E',  'E',  'E',  'E',  'E',  'E',  'E',  'E',
 'F',  'F',  'F',  'F',  'F',  'F',  'F',  'F',  'F',  'F',
 'F',  'F',  'F',  'F',  'F',  'F'
};

static const unsigned char gsHexEncodeMap2[256] = {
 '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',
 'A',  'B',  'C',  'D',  'E',  'F',  '0',  '1',  '2',  '3',
 '4',  '5',  '6',  '7',  '8',  '9',  'A',  'B',  'C',  'D',
 'E',  'F',  '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
 '8',  '9',  'A',  'B',  'C',  'D',  'E',  'F',  '0',  '1',
 '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',  'A',  'B',
 'C',  'D',  'E',  'F',  '0',  '1',  '2',  '3',  '4',  '5',
 '6',  '7',  '8',  '9',  'A',  'B',  'C',  'D',  'E',  'F',
 '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',
 'A',  'B',  'C',  'D',  'E',  'F',  '0',  '1',  '2',  '3',
 '4',  '5',  '6',  '7',  '8',  '9',  'A',  'B',  'C',  'D',
 'E',  'F',  '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
 '8',  '9',  'A',  'B',  'C',  'D',  'E',  'F',  '0',  '1',
 '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',  'A',  'B',
 'C',  'D',  'E',  'F',  '0',  '1',  '2',  '3',  '4',  '5',
 '6',  '7',  '8',  '9',  'A',  'B',  'C',  'D',  'E',  'F',
 '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',
 'A',  'B',  'C',  'D',  'E',  'F',  '0',  '1',  '2',  '3',
 '4',  '5',  '6',  '7',  '8',  '9',  'A',  'B',  'C',  'D',
 'E',  'F',  '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
 '8',  '9',  'A',  'B',  'C',  'D',  'E',  'F',  '0',  '1',
 '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',  'A',  'B',
 'C',  'D',  'E',  'F',  '0',  '1',  '2',  '3',  '4',  '5',
 '6',  '7',  '8',  '9',  'A',  'B',  'C',  'D',  'E',  'F',
 '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9',
 'A',  'B',  'C',  'D',  'E',  'F'
};

